package com.jt.system.dao.impl;

import com.jt.system.dao.UserDao;
import com.jt.system.pojo.User;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

@Repository //用于描述数据层实现类对象
public class UserDaoImpl implements UserDao {
    @Autowired
    private SqlSession sqlSession;
    @Override
    public User selectUserByUsername(String username) {
        String statement="com.jt.system.dao.UserDao.selectUserByUsername";
        User blog = sqlSession.selectOne(statement, "admin");
       return blog;
    }
}//SqlSession-->Executor(CachingExecutor)-->Connection-->PreparedStatement-->ResultSet
